3.251 \(\int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx\)

Optimal. Leaf size=464 \[ \frac {a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac {a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac {1}{16} a^2 x \left (6 A \left (4 c^3+8 c^2 d+7 c d^2+2 d^3\right )+B \left (16 c^3+42 c^2 d+36 c d^2+11 d^3\right )\right )+\frac {a^2 \left (6 A d \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right )-B \left (4 c^4-24 c^3 d+96 c^2 d^2+284 c d^3+165 d^4\right )\right ) \sin (e+f x) \cos (e+f x)}{240 d f}+\frac {a^2 \left (6 A d \left (c^4-10 c^3 d-44 c^2 d^2-40 c d^3-12 d^4\right )-B \left (2 c^5-12 c^4 d+47 c^3 d^2+208 c^2 d^3+216 c d^4+64 d^5\right )\right ) \cos (e+f x)}{60 d^2 f}+\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f} \]

[Out]

1/16*a^2*(6*A*(4*c^3+8*c^2*d+7*c*d^2+2*d^3)+B*(16*c^3+42*c^2*d+36*c*d^2+11*d^3))*x+1/60*a^2*(6*A*d*(c^4-10*c^3
*d-44*c^2*d^2-40*c*d^3-12*d^4)-B*(2*c^5-12*c^4*d+47*c^3*d^2+208*c^2*d^3+216*c*d^4+64*d^5))*cos(f*x+e)/d^2/f+1/
240*a^2*(6*A*d*(2*c^3-20*c^2*d-57*c*d^2-30*d^3)-B*(4*c^4-24*c^3*d+96*c^2*d^2+284*c*d^3+165*d^4))*cos(f*x+e)*si
n(f*x+e)/d/f+1/120*a^2*(6*A*d*(c^2-10*c*d-12*d^2)-B*(2*c^3-12*c^2*d+51*c*d^2+64*d^3))*cos(f*x+e)*(c+d*sin(f*x+
e))^2/d^2/f+1/120*a^2*(6*A*(c-10*d)*d-B*(2*c^2-12*c*d+55*d^2))*cos(f*x+e)*(c+d*sin(f*x+e))^3/d^2/f+1/30*a^2*(-
6*A*d+2*B*c-7*B*d)*cos(f*x+e)*(c+d*sin(f*x+e))^4/d^2/f-1/6*B*cos(f*x+e)*(a^2+a^2*sin(f*x+e))*(c+d*sin(f*x+e))^
4/d/f

________________________________________________________________________________________

Rubi [A]  time = 0.95, antiderivative size = 464, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2976, 2968, 3023, 2753, 2734} \[ \frac {a^2 \left (6 A d \left (-44 c^2 d^2-10 c^3 d+c^4-40 c d^3-12 d^4\right )-B \left (47 c^3 d^2+208 c^2 d^3-12 c^4 d+2 c^5+216 c d^4+64 d^5\right )\right ) \cos (e+f x)}{60 d^2 f}+\frac {a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac {a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (-12 c^2 d+2 c^3+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac {a^2 \left (6 A d \left (-20 c^2 d+2 c^3-57 c d^2-30 d^3\right )-B \left (96 c^2 d^2-24 c^3 d+4 c^4+284 c d^3+165 d^4\right )\right ) \sin (e+f x) \cos (e+f x)}{240 d f}+\frac {1}{16} a^2 x \left (6 A \left (8 c^2 d+4 c^3+7 c d^2+2 d^3\right )+B \left (42 c^2 d+16 c^3+36 c d^2+11 d^3\right )\right )+\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f} \]

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^3,x]

[Out]

(a^2*(6*A*(4*c^3 + 8*c^2*d + 7*c*d^2 + 2*d^3) + B*(16*c^3 + 42*c^2*d + 36*c*d^2 + 11*d^3))*x)/16 + (a^2*(6*A*d
*(c^4 - 10*c^3*d - 44*c^2*d^2 - 40*c*d^3 - 12*d^4) - B*(2*c^5 - 12*c^4*d + 47*c^3*d^2 + 208*c^2*d^3 + 216*c*d^
4 + 64*d^5))*Cos[e + f*x])/(60*d^2*f) + (a^2*(6*A*d*(2*c^3 - 20*c^2*d - 57*c*d^2 - 30*d^3) - B*(4*c^4 - 24*c^3
*d + 96*c^2*d^2 + 284*c*d^3 + 165*d^4))*Cos[e + f*x]*Sin[e + f*x])/(240*d*f) + (a^2*(6*A*d*(c^2 - 10*c*d - 12*
d^2) - B*(2*c^3 - 12*c^2*d + 51*c*d^2 + 64*d^3))*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(120*d^2*f) + (a^2*(6*A*
(c - 10*d)*d - B*(2*c^2 - 12*c*d + 55*d^2))*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(120*d^2*f) + (a^2*(2*B*c - 6
*A*d - 7*B*d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(30*d^2*f) - (B*Cos[e + f*x]*(a^2 + a^2*Sin[e + f*x])*(c +
d*Sin[e + f*x])^4)/(6*d*f)

Rule 2734

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[((2*a*c
+ b*d)*x)/2, x] + (-Simp[((b*c + a*d)*Cos[e + f*x])/f, x] - Simp[(b*d*Cos[e + f*x]*Sin[e + f*x])/(2*f), x]) /;
 FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]

Rule 2753

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(d
*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(f*(m + 1)), x] + Dist[1/(m + 1), Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[
b*d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*
c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]

Rule 2968

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(
e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x
]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]

Rule 2976

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> -Simp[(b*B*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])
^(n + 1))/(d*f*(m + n + 1)), x] + Dist[1/(d*(m + n + 1)), Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x]
)^n*Simp[a*A*d*(m + n + 1) + B*(a*c*(m - 1) + b*d*(n + 1)) + (A*b*d*(m + n + 1) - B*(b*c*m - a*d*(2*m + n)))*S
in[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&
NeQ[c^2 - d^2, 0] && GtQ[m, 1/2] &&  !LtQ[n, -1] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])

Rule 3023

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (
f_.)*(x_)]^2), x_Symbol] :> -Simp[(C*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1))/(b*f*(m + 2)), x] + Dist[1/(b*
(m + 2)), Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x]
, x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] &&  !LtQ[m, -1]

Rubi steps

\begin {align*} \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx &=-\frac {B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac {\int (a+a \sin (e+f x)) (c+d \sin (e+f x))^3 (a (6 A d+B (c+4 d))-a (2 B c-6 A d-7 B d) \sin (e+f x)) \, dx}{6 d}\\ &=-\frac {B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac {\int (c+d \sin (e+f x))^3 \left (a^2 (6 A d+B (c+4 d))+\left (-a^2 (2 B c-6 A d-7 B d)+a^2 (6 A d+B (c+4 d))\right ) \sin (e+f x)-a^2 (2 B c-6 A d-7 B d) \sin ^2(e+f x)\right ) \, dx}{6 d}\\ &=\frac {a^2 (2 B c-6 A d-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac {B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac {\int (c+d \sin (e+f x))^3 \left (-3 a^2 d (B c-18 A d-16 B d)-a^2 \left (6 A (c-10 d) d-B \left (2 c^2-12 c d+55 d^2\right )\right ) \sin (e+f x)\right ) \, dx}{30 d^2}\\ &=\frac {a^2 \left (6 A (c-10 d) d-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac {a^2 (2 B c-6 A d-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac {B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac {\int (c+d \sin (e+f x))^2 \left (3 a^2 d \left (6 A d (11 c+10 d)-B \left (2 c^2-52 c d-55 d^2\right )\right )-3 a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \sin (e+f x)\right ) \, dx}{120 d^2}\\ &=\frac {a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac {a^2 \left (6 A (c-10 d) d-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac {a^2 (2 B c-6 A d-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac {B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}+\frac {\int (c+d \sin (e+f x)) \left (3 a^2 d \left (6 A d \left (31 c^2+50 c d+24 d^2\right )-B \left (2 c^3-132 c^2 d-267 c d^2-128 d^3\right )\right )-3 a^2 \left (6 A d \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right )-B \left (4 c^4-24 c^3 d+96 c^2 d^2+284 c d^3+165 d^4\right )\right ) \sin (e+f x)\right ) \, dx}{360 d^2}\\ &=\frac {1}{16} a^2 \left (6 A \left (4 c^3+8 c^2 d+7 c d^2+2 d^3\right )+B \left (16 c^3+42 c^2 d+36 c d^2+11 d^3\right )\right ) x+\frac {a^2 \left (6 A d \left (c^4-10 c^3 d-44 c^2 d^2-40 c d^3-12 d^4\right )-B \left (2 c^5-12 c^4 d+47 c^3 d^2+208 c^2 d^3+216 c d^4+64 d^5\right )\right ) \cos (e+f x)}{60 d^2 f}+\frac {a^2 \left (6 A d \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right )-B \left (4 c^4-24 c^3 d+96 c^2 d^2+284 c d^3+165 d^4\right )\right ) \cos (e+f x) \sin (e+f x)}{240 d f}+\frac {a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac {a^2 \left (6 A (c-10 d) d-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac {a^2 (2 B c-6 A d-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac {B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 3.13, size = 437, normalized size = 0.94 \[ -\frac {a^2 \cos (e+f x) \left (60 \left (6 A \left (4 c^3+8 c^2 d+7 c d^2+2 d^3\right )+B \left (16 c^3+42 c^2 d+36 c d^2+11 d^3\right )\right ) \sin ^{-1}\left (\frac {\sqrt {1-\sin (e+f x)}}{\sqrt {2}}\right )+\sqrt {\cos ^2(e+f x)} \left (-16 \left (3 A d \left (5 c^2+10 c d+4 d^2\right )+B \left (5 c^3+30 c^2 d+36 c d^2+14 d^3\right )\right ) \cos (2 (e+f x))+12 d^2 (A d+3 B c+2 B d) \cos (4 (e+f x))+240 A c^3 \sin (e+f x)+960 A c^3+1440 A c^2 d \sin (e+f x)+2640 A c^2 d+1530 A c d^2 \sin (e+f x)-90 A c d^2 \sin (3 (e+f x))+2400 A c d^2+540 A d^3 \sin (e+f x)-60 A d^3 \sin (3 (e+f x))+756 A d^3+480 B c^3 \sin (e+f x)+880 B c^3+1530 B c^2 d \sin (e+f x)-90 B c^2 d \sin (3 (e+f x))+2400 B c^2 d+1620 B c d^2 \sin (e+f x)-180 B c d^2 \sin (3 (e+f x))+2268 B c d^2+545 B d^3 \sin (e+f x)-80 B d^3 \sin (3 (e+f x))+5 B d^3 \sin (5 (e+f x))+712 B d^3\right )\right )}{480 f \sqrt {\cos ^2(e+f x)}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^2*(A + B*Sin[e + f*x])*(c + d*Sin[e + f*x])^3,x]

[Out]

-1/480*(a^2*Cos[e + f*x]*(60*(6*A*(4*c^3 + 8*c^2*d + 7*c*d^2 + 2*d^3) + B*(16*c^3 + 42*c^2*d + 36*c*d^2 + 11*d
^3))*ArcSin[Sqrt[1 - Sin[e + f*x]]/Sqrt[2]] + Sqrt[Cos[e + f*x]^2]*(960*A*c^3 + 880*B*c^3 + 2640*A*c^2*d + 240
0*B*c^2*d + 2400*A*c*d^2 + 2268*B*c*d^2 + 756*A*d^3 + 712*B*d^3 - 16*(3*A*d*(5*c^2 + 10*c*d + 4*d^2) + B*(5*c^
3 + 30*c^2*d + 36*c*d^2 + 14*d^3))*Cos[2*(e + f*x)] + 12*d^2*(3*B*c + A*d + 2*B*d)*Cos[4*(e + f*x)] + 240*A*c^
3*Sin[e + f*x] + 480*B*c^3*Sin[e + f*x] + 1440*A*c^2*d*Sin[e + f*x] + 1530*B*c^2*d*Sin[e + f*x] + 1530*A*c*d^2
*Sin[e + f*x] + 1620*B*c*d^2*Sin[e + f*x] + 540*A*d^3*Sin[e + f*x] + 545*B*d^3*Sin[e + f*x] - 90*B*c^2*d*Sin[3
*(e + f*x)] - 90*A*c*d^2*Sin[3*(e + f*x)] - 180*B*c*d^2*Sin[3*(e + f*x)] - 60*A*d^3*Sin[3*(e + f*x)] - 80*B*d^
3*Sin[3*(e + f*x)] + 5*B*d^3*Sin[5*(e + f*x)])))/(f*Sqrt[Cos[e + f*x]^2])

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 364, normalized size = 0.78 \[ -\frac {48 \, {\left (3 \, B a^{2} c d^{2} + {\left (A + 2 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )^{5} - 80 \, {\left (B a^{2} c^{3} + 3 \, {\left (A + 2 \, B\right )} a^{2} c^{2} d + 3 \, {\left (2 \, A + 3 \, B\right )} a^{2} c d^{2} + {\left (3 \, A + 4 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (8 \, {\left (3 \, A + 2 \, B\right )} a^{2} c^{3} + 6 \, {\left (8 \, A + 7 \, B\right )} a^{2} c^{2} d + 6 \, {\left (7 \, A + 6 \, B\right )} a^{2} c d^{2} + {\left (12 \, A + 11 \, B\right )} a^{2} d^{3}\right )} f x + 480 \, {\left ({\left (A + B\right )} a^{2} c^{3} + 3 \, {\left (A + B\right )} a^{2} c^{2} d + 3 \, {\left (A + B\right )} a^{2} c d^{2} + {\left (A + B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right ) + 5 \, {\left (8 \, B a^{2} d^{3} \cos \left (f x + e\right )^{5} - 2 \, {\left (18 \, B a^{2} c^{2} d + 18 \, {\left (A + 2 \, B\right )} a^{2} c d^{2} + {\left (12 \, A + 19 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (8 \, {\left (A + 2 \, B\right )} a^{2} c^{3} + 6 \, {\left (8 \, A + 9 \, B\right )} a^{2} c^{2} d + 6 \, {\left (9 \, A + 10 \, B\right )} a^{2} c d^{2} + {\left (20 \, A + 21 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algorithm="fricas")

[Out]

-1/240*(48*(3*B*a^2*c*d^2 + (A + 2*B)*a^2*d^3)*cos(f*x + e)^5 - 80*(B*a^2*c^3 + 3*(A + 2*B)*a^2*c^2*d + 3*(2*A
 + 3*B)*a^2*c*d^2 + (3*A + 4*B)*a^2*d^3)*cos(f*x + e)^3 - 15*(8*(3*A + 2*B)*a^2*c^3 + 6*(8*A + 7*B)*a^2*c^2*d
+ 6*(7*A + 6*B)*a^2*c*d^2 + (12*A + 11*B)*a^2*d^3)*f*x + 480*((A + B)*a^2*c^3 + 3*(A + B)*a^2*c^2*d + 3*(A + B
)*a^2*c*d^2 + (A + B)*a^2*d^3)*cos(f*x + e) + 5*(8*B*a^2*d^3*cos(f*x + e)^5 - 2*(18*B*a^2*c^2*d + 18*(A + 2*B)
*a^2*c*d^2 + (12*A + 19*B)*a^2*d^3)*cos(f*x + e)^3 + 3*(8*(A + 2*B)*a^2*c^3 + 6*(8*A + 9*B)*a^2*c^2*d + 6*(9*A
 + 10*B)*a^2*c*d^2 + (20*A + 21*B)*a^2*d^3)*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

giac [A]  time = 0.22, size = 474, normalized size = 1.02 \[ -\frac {B a^{2} d^{3} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac {1}{16} \, {\left (24 \, A a^{2} c^{3} + 16 \, B a^{2} c^{3} + 48 \, A a^{2} c^{2} d + 42 \, B a^{2} c^{2} d + 42 \, A a^{2} c d^{2} + 36 \, B a^{2} c d^{2} + 12 \, A a^{2} d^{3} + 11 \, B a^{2} d^{3}\right )} x - \frac {{\left (3 \, B a^{2} c d^{2} + A a^{2} d^{3} + 2 \, B a^{2} d^{3}\right )} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {{\left (4 \, B a^{2} c^{3} + 12 \, A a^{2} c^{2} d + 24 \, B a^{2} c^{2} d + 24 \, A a^{2} c d^{2} + 27 \, B a^{2} c d^{2} + 9 \, A a^{2} d^{3} + 10 \, B a^{2} d^{3}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac {{\left (16 \, A a^{2} c^{3} + 14 \, B a^{2} c^{3} + 42 \, A a^{2} c^{2} d + 36 \, B a^{2} c^{2} d + 36 \, A a^{2} c d^{2} + 33 \, B a^{2} c d^{2} + 11 \, A a^{2} d^{3} + 10 \, B a^{2} d^{3}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac {{\left (6 \, B a^{2} c^{2} d + 6 \, A a^{2} c d^{2} + 12 \, B a^{2} c d^{2} + 4 \, A a^{2} d^{3} + 5 \, B a^{2} d^{3}\right )} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} - \frac {{\left (16 \, A a^{2} c^{3} + 32 \, B a^{2} c^{3} + 96 \, A a^{2} c^{2} d + 96 \, B a^{2} c^{2} d + 96 \, A a^{2} c d^{2} + 96 \, B a^{2} c d^{2} + 32 \, A a^{2} d^{3} + 31 \, B a^{2} d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algorithm="giac")

[Out]

-1/192*B*a^2*d^3*sin(6*f*x + 6*e)/f + 1/16*(24*A*a^2*c^3 + 16*B*a^2*c^3 + 48*A*a^2*c^2*d + 42*B*a^2*c^2*d + 42
*A*a^2*c*d^2 + 36*B*a^2*c*d^2 + 12*A*a^2*d^3 + 11*B*a^2*d^3)*x - 1/80*(3*B*a^2*c*d^2 + A*a^2*d^3 + 2*B*a^2*d^3
)*cos(5*f*x + 5*e)/f + 1/48*(4*B*a^2*c^3 + 12*A*a^2*c^2*d + 24*B*a^2*c^2*d + 24*A*a^2*c*d^2 + 27*B*a^2*c*d^2 +
 9*A*a^2*d^3 + 10*B*a^2*d^3)*cos(3*f*x + 3*e)/f - 1/8*(16*A*a^2*c^3 + 14*B*a^2*c^3 + 42*A*a^2*c^2*d + 36*B*a^2
*c^2*d + 36*A*a^2*c*d^2 + 33*B*a^2*c*d^2 + 11*A*a^2*d^3 + 10*B*a^2*d^3)*cos(f*x + e)/f + 1/64*(6*B*a^2*c^2*d +
 6*A*a^2*c*d^2 + 12*B*a^2*c*d^2 + 4*A*a^2*d^3 + 5*B*a^2*d^3)*sin(4*f*x + 4*e)/f - 1/64*(16*A*a^2*c^3 + 32*B*a^
2*c^3 + 96*A*a^2*c^2*d + 96*B*a^2*c^2*d + 96*A*a^2*c*d^2 + 96*B*a^2*c*d^2 + 32*A*a^2*d^3 + 31*B*a^2*d^3)*sin(2
*f*x + 2*e)/f

________________________________________________________________________________________

maple [A]  time = 0.64, size = 745, normalized size = 1.61 \[ \frac {a^{2} A \,c^{3} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a^{2} A \,c^{2} d \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )+3 a^{2} A c \,d^{2} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {a^{2} A \,d^{3} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}-\frac {B \,a^{2} c^{3} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}+3 B \,a^{2} c^{2} d \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {3 B \,a^{2} c \,d^{2} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}+B \,a^{2} d^{3} \left (-\frac {\left (\sin ^{5}\left (f x +e \right )+\frac {5 \left (\sin ^{3}\left (f x +e \right )\right )}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )-2 a^{2} A \,c^{3} \cos \left (f x +e \right )+6 a^{2} A \,c^{2} d \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 a^{2} A c \,d^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )+2 a^{2} A \,d^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )+2 B \,a^{2} c^{3} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 B \,a^{2} c^{2} d \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )+6 B \,a^{2} c \,d^{2} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {2 B \,a^{2} d^{3} \left (\frac {8}{3}+\sin ^{4}\left (f x +e \right )+\frac {4 \left (\sin ^{2}\left (f x +e \right )\right )}{3}\right ) \cos \left (f x +e \right )}{5}+a^{2} A \,c^{3} \left (f x +e \right )-3 a^{2} A \,c^{2} d \cos \left (f x +e \right )+3 a^{2} A c \,d^{2} \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\frac {a^{2} A \,d^{3} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )}{3}-B \,a^{2} c^{3} \cos \left (f x +e \right )+3 B \,a^{2} c^{2} d \left (-\frac {\sin \left (f x +e \right ) \cos \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-B \,a^{2} c \,d^{2} \left (2+\sin ^{2}\left (f x +e \right )\right ) \cos \left (f x +e \right )+B \,a^{2} d^{3} \left (-\frac {\left (\sin ^{3}\left (f x +e \right )+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x)

[Out]

1/f*(a^2*A*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-a^2*A*c^2*d*(2+sin(f*x+e)^2)*cos(f*x+e)+3*a^2*A*c*d^
2*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-1/5*a^2*A*d^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)
^2)*cos(f*x+e)-1/3*B*a^2*c^3*(2+sin(f*x+e)^2)*cos(f*x+e)+3*B*a^2*c^2*d*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos
(f*x+e)+3/8*f*x+3/8*e)-3/5*B*a^2*c*d^2*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+B*a^2*d^3*(-1/6*(sin(f*x
+e)^5+5/4*sin(f*x+e)^3+15/8*sin(f*x+e))*cos(f*x+e)+5/16*f*x+5/16*e)-2*a^2*A*c^3*cos(f*x+e)+6*a^2*A*c^2*d*(-1/2
*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2*a^2*A*c*d^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a^2*A*d^3*(-1/4*(sin(f*x+e)^
3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)+2*B*a^2*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2*B*a^2*c^2
*d*(2+sin(f*x+e)^2)*cos(f*x+e)+6*B*a^2*c*d^2*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-2/5
*B*a^2*d^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+a^2*A*c^3*(f*x+e)-3*a^2*A*c^2*d*cos(f*x+e)+3*a^2*A*c
*d^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-1/3*a^2*A*d^3*(2+sin(f*x+e)^2)*cos(f*x+e)-B*a^2*c^3*cos(f*x+e)
+3*B*a^2*c^2*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-B*a^2*c*d^2*(2+sin(f*x+e)^2)*cos(f*x+e)+B*a^2*d^3*(-
1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e))

________________________________________________________________________________________

maxima [A]  time = 0.46, size = 724, normalized size = 1.56 \[ \frac {240 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c^{3} + 960 \, {\left (f x + e\right )} A a^{2} c^{3} + 320 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{2} c^{3} + 480 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{3} + 960 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a^{2} c^{2} d + 1440 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c^{2} d + 1920 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{2} c^{2} d + 90 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{2} d + 720 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c^{2} d + 1920 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a^{2} c d^{2} + 90 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c d^{2} + 720 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} c d^{2} - 192 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} B a^{2} c d^{2} + 960 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} B a^{2} c d^{2} + 180 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} c d^{2} - 64 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} A a^{2} d^{3} + 320 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} A a^{2} d^{3} + 60 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} A a^{2} d^{3} - 128 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} B a^{2} d^{3} + 5 \, {\left (4 \, \sin \left (2 \, f x + 2 \, e\right )^{3} + 60 \, f x + 60 \, e + 9 \, \sin \left (4 \, f x + 4 \, e\right ) - 48 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} d^{3} + 30 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} B a^{2} d^{3} - 1920 \, A a^{2} c^{3} \cos \left (f x + e\right ) - 960 \, B a^{2} c^{3} \cos \left (f x + e\right ) - 2880 \, A a^{2} c^{2} d \cos \left (f x + e\right )}{960 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algorithm="maxima")

[Out]

1/960*(240*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c^3 + 960*(f*x + e)*A*a^2*c^3 + 320*(cos(f*x + e)^3 - 3*cos(
f*x + e))*B*a^2*c^3 + 480*(2*f*x + 2*e - sin(2*f*x + 2*e))*B*a^2*c^3 + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*A
*a^2*c^2*d + 1440*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c^2*d + 1920*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^2*
c^2*d + 90*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*c^2*d + 720*(2*f*x + 2*e - sin(2*f*x
+ 2*e))*B*a^2*c^2*d + 1920*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^2*c*d^2 + 90*(12*f*x + 12*e + sin(4*f*x + 4*e
) - 8*sin(2*f*x + 2*e))*A*a^2*c*d^2 + 720*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c*d^2 - 192*(3*cos(f*x + e)^5
 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^2*c*d^2 + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^2*c*d^2 + 180*
(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*c*d^2 - 64*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3
 + 15*cos(f*x + e))*A*a^2*d^3 + 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^2*d^3 + 60*(12*f*x + 12*e + sin(4*f*
x + 4*e) - 8*sin(2*f*x + 2*e))*A*a^2*d^3 - 128*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^2*
d^3 + 5*(4*sin(2*f*x + 2*e)^3 + 60*f*x + 60*e + 9*sin(4*f*x + 4*e) - 48*sin(2*f*x + 2*e))*B*a^2*d^3 + 30*(12*f
*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*B*a^2*d^3 - 1920*A*a^2*c^3*cos(f*x + e) - 960*B*a^2*c^3*cos
(f*x + e) - 2880*A*a^2*c^2*d*cos(f*x + e))/f

________________________________________________________________________________________

mupad [B]  time = 15.99, size = 1291, normalized size = 2.78 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*sin(e + f*x))*(a + a*sin(e + f*x))^2*(c + d*sin(e + f*x))^3,x)

[Out]

(a^2*atan((a^2*tan(e/2 + (f*x)/2)*(24*A*c^3 + 12*A*d^3 + 16*B*c^3 + 11*B*d^3 + 42*A*c*d^2 + 48*A*c^2*d + 36*B*
c*d^2 + 42*B*c^2*d))/(8*(3*A*a^2*c^3 + (3*A*a^2*d^3)/2 + 2*B*a^2*c^3 + (11*B*a^2*d^3)/8 + (21*A*a^2*c*d^2)/4 +
 6*A*a^2*c^2*d + (9*B*a^2*c*d^2)/2 + (21*B*a^2*c^2*d)/4)))*(24*A*c^3 + 12*A*d^3 + 16*B*c^3 + 11*B*d^3 + 42*A*c
*d^2 + 48*A*c^2*d + 36*B*c*d^2 + 42*B*c^2*d))/(8*f) - (tan(e/2 + (f*x)/2)*(A*a^2*c^3 + (3*A*a^2*d^3)/2 + 2*B*a
^2*c^3 + (11*B*a^2*d^3)/8 + (21*A*a^2*c*d^2)/4 + 6*A*a^2*c^2*d + (9*B*a^2*c*d^2)/2 + (21*B*a^2*c^2*d)/4) + tan
(e/2 + (f*x)/2)^8*(20*A*a^2*c^3 + 4*A*a^2*d^3 + 14*B*a^2*c^3 + 24*A*a^2*c*d^2 + 42*A*a^2*c^2*d + 12*B*a^2*c*d^
2 + 24*B*a^2*c^2*d) - tan(e/2 + (f*x)/2)^11*(A*a^2*c^3 + (3*A*a^2*d^3)/2 + 2*B*a^2*c^3 + (11*B*a^2*d^3)/8 + (2
1*A*a^2*c*d^2)/4 + 6*A*a^2*c^2*d + (9*B*a^2*c*d^2)/2 + (21*B*a^2*c^2*d)/4) + tan(e/2 + (f*x)/2)^5*(2*A*a^2*c^3
 + 7*A*a^2*d^3 + 4*B*a^2*c^3 + (47*B*a^2*d^3)/4 + (33*A*a^2*c*d^2)/2 + 12*A*a^2*c^2*d + 21*B*a^2*c*d^2 + (33*B
*a^2*c^2*d)/2) - tan(e/2 + (f*x)/2)^7*(2*A*a^2*c^3 + 7*A*a^2*d^3 + 4*B*a^2*c^3 + (47*B*a^2*d^3)/4 + (33*A*a^2*
c*d^2)/2 + 12*A*a^2*c^2*d + 21*B*a^2*c*d^2 + (33*B*a^2*c^2*d)/2) + tan(e/2 + (f*x)/2)^3*(3*A*a^2*c^3 + (17*A*a
^2*d^3)/2 + 6*B*a^2*c^3 + (187*B*a^2*d^3)/24 + (87*A*a^2*c*d^2)/4 + 18*A*a^2*c^2*d + (51*B*a^2*c*d^2)/2 + (87*
B*a^2*c^2*d)/4) - tan(e/2 + (f*x)/2)^9*(3*A*a^2*c^3 + (17*A*a^2*d^3)/2 + 6*B*a^2*c^3 + (187*B*a^2*d^3)/24 + (8
7*A*a^2*c*d^2)/4 + 18*A*a^2*c^2*d + (51*B*a^2*c*d^2)/2 + (87*B*a^2*c^2*d)/4) + tan(e/2 + (f*x)/2)^4*(40*A*a^2*
c^3 + 32*A*a^2*d^3 + 36*B*a^2*c^3 + 32*B*a^2*d^3 + 96*A*a^2*c*d^2 + 108*A*a^2*c^2*d + 96*B*a^2*c*d^2 + 96*B*a^
2*c^2*d) + tan(e/2 + (f*x)/2)^2*(20*A*a^2*c^3 + (72*A*a^2*d^3)/5 + 18*B*a^2*c^3 + (64*B*a^2*d^3)/5 + 48*A*a^2*
c*d^2 + 54*A*a^2*c^2*d + (216*B*a^2*c*d^2)/5 + 48*B*a^2*c^2*d) + tan(e/2 + (f*x)/2)^6*(40*A*a^2*c^3 + 24*A*a^2
*d^3 + (100*B*a^2*c^3)/3 + (64*B*a^2*d^3)/3 + 80*A*a^2*c*d^2 + 100*A*a^2*c^2*d + 72*B*a^2*c*d^2 + 80*B*a^2*c^2
*d) + tan(e/2 + (f*x)/2)^10*(4*A*a^2*c^3 + 2*B*a^2*c^3 + 6*A*a^2*c^2*d) + 4*A*a^2*c^3 + (12*A*a^2*d^3)/5 + (10
*B*a^2*c^3)/3 + (32*B*a^2*d^3)/15 + 8*A*a^2*c*d^2 + 10*A*a^2*c^2*d + (36*B*a^2*c*d^2)/5 + 8*B*a^2*c^2*d)/(f*(6
*tan(e/2 + (f*x)/2)^2 + 15*tan(e/2 + (f*x)/2)^4 + 20*tan(e/2 + (f*x)/2)^6 + 15*tan(e/2 + (f*x)/2)^8 + 6*tan(e/
2 + (f*x)/2)^10 + tan(e/2 + (f*x)/2)^12 + 1))

________________________________________________________________________________________

sympy [A]  time = 11.95, size = 1865, normalized size = 4.02 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))**3,x)

[Out]

Piecewise((A*a**2*c**3*x*sin(e + f*x)**2/2 + A*a**2*c**3*x*cos(e + f*x)**2/2 + A*a**2*c**3*x - A*a**2*c**3*sin
(e + f*x)*cos(e + f*x)/(2*f) - 2*A*a**2*c**3*cos(e + f*x)/f + 3*A*a**2*c**2*d*x*sin(e + f*x)**2 + 3*A*a**2*c**
2*d*x*cos(e + f*x)**2 - 3*A*a**2*c**2*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a**2*c**2*d*sin(e + f*x)*cos(e +
f*x)/f - 2*A*a**2*c**2*d*cos(e + f*x)**3/f - 3*A*a**2*c**2*d*cos(e + f*x)/f + 9*A*a**2*c*d**2*x*sin(e + f*x)**
4/8 + 9*A*a**2*c*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*A*a**2*c*d**2*x*sin(e + f*x)**2/2 + 9*A*a**2*c*d
**2*x*cos(e + f*x)**4/8 + 3*A*a**2*c*d**2*x*cos(e + f*x)**2/2 - 15*A*a**2*c*d**2*sin(e + f*x)**3*cos(e + f*x)/
(8*f) - 6*A*a**2*c*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 9*A*a**2*c*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) -
3*A*a**2*c*d**2*sin(e + f*x)*cos(e + f*x)/(2*f) - 4*A*a**2*c*d**2*cos(e + f*x)**3/f + 3*A*a**2*d**3*x*sin(e +
f*x)**4/4 + 3*A*a**2*d**3*x*sin(e + f*x)**2*cos(e + f*x)**2/2 + 3*A*a**2*d**3*x*cos(e + f*x)**4/4 - A*a**2*d**
3*sin(e + f*x)**4*cos(e + f*x)/f - 5*A*a**2*d**3*sin(e + f*x)**3*cos(e + f*x)/(4*f) - 4*A*a**2*d**3*sin(e + f*
x)**2*cos(e + f*x)**3/(3*f) - A*a**2*d**3*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a**2*d**3*sin(e + f*x)*cos(e +
f*x)**3/(4*f) - 8*A*a**2*d**3*cos(e + f*x)**5/(15*f) - 2*A*a**2*d**3*cos(e + f*x)**3/(3*f) + B*a**2*c**3*x*sin
(e + f*x)**2 + B*a**2*c**3*x*cos(e + f*x)**2 - B*a**2*c**3*sin(e + f*x)**2*cos(e + f*x)/f - B*a**2*c**3*sin(e
+ f*x)*cos(e + f*x)/f - 2*B*a**2*c**3*cos(e + f*x)**3/(3*f) - B*a**2*c**3*cos(e + f*x)/f + 9*B*a**2*c**2*d*x*s
in(e + f*x)**4/8 + 9*B*a**2*c**2*d*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*B*a**2*c**2*d*x*sin(e + f*x)**2/2 +
 9*B*a**2*c**2*d*x*cos(e + f*x)**4/8 + 3*B*a**2*c**2*d*x*cos(e + f*x)**2/2 - 15*B*a**2*c**2*d*sin(e + f*x)**3*
cos(e + f*x)/(8*f) - 6*B*a**2*c**2*d*sin(e + f*x)**2*cos(e + f*x)/f - 9*B*a**2*c**2*d*sin(e + f*x)*cos(e + f*x
)**3/(8*f) - 3*B*a**2*c**2*d*sin(e + f*x)*cos(e + f*x)/(2*f) - 4*B*a**2*c**2*d*cos(e + f*x)**3/f + 9*B*a**2*c*
d**2*x*sin(e + f*x)**4/4 + 9*B*a**2*c*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/2 + 9*B*a**2*c*d**2*x*cos(e + f*x
)**4/4 - 3*B*a**2*c*d**2*sin(e + f*x)**4*cos(e + f*x)/f - 15*B*a**2*c*d**2*sin(e + f*x)**3*cos(e + f*x)/(4*f)
- 4*B*a**2*c*d**2*sin(e + f*x)**2*cos(e + f*x)**3/f - 3*B*a**2*c*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 9*B*a**
2*c*d**2*sin(e + f*x)*cos(e + f*x)**3/(4*f) - 8*B*a**2*c*d**2*cos(e + f*x)**5/(5*f) - 2*B*a**2*c*d**2*cos(e +
f*x)**3/f + 5*B*a**2*d**3*x*sin(e + f*x)**6/16 + 15*B*a**2*d**3*x*sin(e + f*x)**4*cos(e + f*x)**2/16 + 3*B*a**
2*d**3*x*sin(e + f*x)**4/8 + 15*B*a**2*d**3*x*sin(e + f*x)**2*cos(e + f*x)**4/16 + 3*B*a**2*d**3*x*sin(e + f*x
)**2*cos(e + f*x)**2/4 + 5*B*a**2*d**3*x*cos(e + f*x)**6/16 + 3*B*a**2*d**3*x*cos(e + f*x)**4/8 - 11*B*a**2*d*
*3*sin(e + f*x)**5*cos(e + f*x)/(16*f) - 2*B*a**2*d**3*sin(e + f*x)**4*cos(e + f*x)/f - 5*B*a**2*d**3*sin(e +
f*x)**3*cos(e + f*x)**3/(6*f) - 5*B*a**2*d**3*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 8*B*a**2*d**3*sin(e + f*x)*
*2*cos(e + f*x)**3/(3*f) - 5*B*a**2*d**3*sin(e + f*x)*cos(e + f*x)**5/(16*f) - 3*B*a**2*d**3*sin(e + f*x)*cos(
e + f*x)**3/(8*f) - 16*B*a**2*d**3*cos(e + f*x)**5/(15*f), Ne(f, 0)), (x*(A + B*sin(e))*(c + d*sin(e))**3*(a*s
in(e) + a)**2, True))

________________________________________________________________________________________